<template>
  <div id="app">
    <Header></Header>
    <!-- 占位符 -->
    <router-view></router-view>
    <Footer v-show="!$route.meta.isHiddenFooter"></Footer>
  </div>
</template>

<script>

  import Header from "@/components/Header"
  import Footer from "@/components/Footer"

export default {

  name: 'App',
  components: {
    Header,
    Footer
  },
  mounted(){
     // 组件一挂载 就dispatch一个action 用于获取分类数据
    this.$store.dispatch('home/getCategoryListData')
    this.$store.dispatch('home/getBannerListData')
  }
}
</script>

<style>

</style>
